package com.huai.demo_test1.singletionsecond.staticInner;import java.io.Serializable;/** * 静态加载，延迟加载 * 静态内部类只有在被使用到的时候才会被jvm加载，所以算是延迟加载 * @author huaixiaohuan */public class StaticInnerClassSingleton implements Serializable {    private static class InnerClass {        private static StaticInnerClassSingleton staticInnerClassSingleton = new StaticInnerClassSingleton();    }    public static StaticInnerClassSingleton getInstance(){        return InnerClass.staticInnerClassSingleton;    }    private StaticInnerClassSingleton() {    }//    private Object readResolve() {//        return InnerClass.staticInnerClassSingleton;//    }}